<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no" />
  <title>App录音</title>
  <!--标准mui.css-->
  <link rel="stylesheet" href="../css/mui.min.css">
  <script src="../js/mui.min.js"></script>
  <!--App自定义的css-->
  <!-- <script src="../js/jweixin-sgccigw-1.0.0.js"></script> -->
  <script src="../js/jquery-3.6.0.min.js"></script>
  <link rel="stylesheet" type="text/css" href="../css/app.css" />
  <link rel="stylesheet" href="../npl/css/vant.mini.css" />
  <script src="../js/vue.js"></script>
  <script src="../js/vconsole.min.js"></script>
  <script src="../js/sm2.js"></script>
  <script src="../js/sm3.js"></script>
  <!-- <script src="../js/feedback.js"></script> -->
  <script src="../js/clipboard.js"></script>
  <script src="../js/flexible.js"></script>
  <script src="../npl/js/vant.mini.js"></script>
  <script src="./text.js" type="text/javascript"></script>
  <style>
    .foot {
      /* margin-top: 7.5px; */
      /* margin-bottom: 7.5px; */
      /* margin-left: 5%; */
      /* position: fixed; */
      box-sizing: border-box;
      width: 100%;
      /* height: 1.7rem; */
      text-align: center;
      display: flex;
      flex-direction: column;
      justify-content: space-around;
    }

    .left a {
      line-height: 0.5rem;
      color: #1E3754;
    }

    .left .left1 {
      position: absolute;
      left: 0.1rem;
      top: 0.25rem;
    }

    .left :nth-child(1) span {
      line-height: 0.5rem;
      color: #fff;
    }

    .top {
      height: 4.5rem;
      width: 100%;
      box-sizing: border-box;
      font-size: 0.3rem;
      /* border: 3px dashed rgb(25, 179, 182); */
      position: relative;
      border-radius: 10px;
      padding: 0.3rem;
      margin-bottom: 0.3rem;
      background-color: #fff;
    }

    .shorthand {
      padding: 0;
      flex: 1;
    }

    .hr {
      background-color: #fff;
      width: 1.5px;
      height: 0.04rem;
      float: right;
      margin-left: 6px;
      animation: liner 1s ease-in-out;
      animation-iteration-count: infinite;
      animation-direction: alternate;
    }

    .hr1,
    .hr4,
    .hr7,
    .hr10,
    .hr13,
    .hr16,
    .hr19,
    .hr22,
    .hr25 {
      animation-delay: -2s;
    }

    .hr2,
    .hr5,
    .hr8,
    .hr11,
    .hr14,
    .hr17,
    .hr20,
    .hr23,
    .hr26 {
      animation-delay: -1s;
    }

    .hr3,
    .hr6,
    .hr9,
    .hr12,
    .hr15,
    .hr18,
    .hr21,
    .hr24 {
      animation-delay: -1.5s;
    }

    @keyframes liner {
      0% {
        transform: scaleY(1);
      }

      100% {
        transform: scaleY(6);
      }
    }

    .lines1 {
      background: url("../image/58.png") no-repeat center;
      background-size: 100% 100%;
      width: 80%;
      height: 0.4rem;
    }

    .lines {
      width: 55%;
    }

    .time {
      /* width: 15%; */
      color: #8a9dbe;
      font-size: 12px;
      margin: .1rem 0 0 .2rem;
    }

    .start {
      width: 100%;
      height: 100%;
    }

    /* WebKit browsers */

    ::-webkit-input-placeholder {
      color: #D8E6FE;
    }

    /* Mozilla Firefox 4 to 18 */

    :-moz-placeholder {
      color: #D8E6FE;
      opacity: 1;
    }

    ::-moz-placeholder {
      color: #D8E6FE;
      opacity: 1;
    }

    :-ms-input-placeholder {
      color: #D8E6FE;
    }

    .mui-toast-container {
      top: 50%
    }

    .clipboardContent {
      position: relative;
      background: none;
      height: 100%;
      padding: .4rem;
    }

    .output_box {
      background: none;
      height: 100%;
      font-size: .36rem !important;
      line-height: 28px;
      /* border: 1px solid #D8E6FE; */
      border: none;
      color: #333;
      /* padding: .25rem .2rem 0rem; */
      padding: .4rem;
      position: absolute;
      left: 0;
      top: 0;
    }

    .clipboardContent img {
      width: 0.3rem;
    }

    .form {
      padding: 0 0rem 0.25rem;
      height: calc(100% - 1.7rem);
      /* background: #fff; */
      flex: 1;
      /* border-radius: 0 0 15px 15px; */
      /* margin: 0.2rem 0.2rem 0.2rem; */
    }

    .voice-list,
    .voice-list li {
      display: none;
    }

    .is-dialog {
      overflow: hidden;
    }

    .is-dialog .dialog {
      filter: progid: DXImageTransform.Microsoft.Alpha(enabled=false);
      /* opacity: 0.7; */
      /* z-index: 1111; */
    }

    .is-dialog .dialog {
      filter: progid: DXImageTransform.Microsoft.Alpha(enabled=false);
    }

    .Btn {
      display: flex;
      justify-content: space-between;
      background: #fff;
      align-items: center;
      flex-wrap: wrap;
      border-radius: 14px 14px 0 0;
      height: 1.7rem;
    }

    .uldis {
      display: flex;
      flex-direction: column;
      justify-content: center;
      flex-wrap: wrap;
      margin: 0;
      padding: 0;
      align-items: center;
    }

    .btn_r {
      display: flex;
      justify-content: center;
      align-items: center;
      padding-right: .4rem;
    }

    .Btn_l {
      display: flex;
      align-items: center;
    }

    .last_Btn {
      width: 1rem;
      height: 1rem;
      margin-left: .5rem;
    }

    .img_box {
      margin: 0 .2rem 0;
      width: 1rem;
      height: 1rem;
    }

    .title_img {
      margin: 0 10px;
      width: .4rem;
      height: .4rem;
    }

    .title_img img {
      width: 100%;
      height: 100%;
    }

    .titleName {
      color: #1E3754;
      width: 98%;
      font-size: 24px;
      font-weight: bold;
      margin: 15px 0 0 0;
    }

    .btn_l_img {
      margin: 0 .22rem;
      width: .38rem;
      height: .38rem;
    }

    .btn_l_img img {
      width: 100%;
      height: 100%;
    }

    .aaa {
      width: 100%;
      height: 100%;
      display: flex;
      flex-direction: column;
    }

    .header_title {
      display: flex;
    }

    .title_inp {
      width: 50%;
    }

    .title_inp input {
      border: none !important;
    }

    .van-popup--center {
      border-radius: 12px;
      width: 80%;
      padding: 20px 10px 10px;
      display: flex;
      justify-content: space-around;
      flex-direction: column;
      height: 25%;
    }

    .van-cell {
      align-items: center;
      padding: 10px 2px 10px 5px;
      justify-content: space-between;
    }

    .van-cell input[type=text] {
      margin: 0;
      padding: 5px 10px
    }

    .van-field__label {
      margin: 0px;
      width: 1rem;
      font-size: 15px;

    }

    .form_btn {
      display: flex;
      justify-content: center;
    }

    .form_btn .van-button {
      flex: 1;
    }

    .form_btn .van-button:nth-child(1) {
      margin-right: .3rem;
    }

    .form_btn .qx {
      background-color: rgba(45, 52, 60, 0.08);
      border-radius: 48px;
      font-family: PingFang SC;
      color: rgba(45, 52, 60, 0.8);
    }

    .form_btn .tj {
      background-color: #13C09B;
      color: #fff;
      border-radius: 48px;
    }

    .edit_title_input input {
      background-color: #f0f3f8;
    }

    .van-button--normal {
      /* padding: 4px 28px; */
      font-size: 14px;
    }

    .xuxian {
      border: 1px rgba(45, 52, 60, 0.04) dashed;
      background-color: none;
    }

    .content_wrapper {
      width: 100%;
      display: flex;
      flex-direction: column;
      flex: 1;
      border-radius: 0 0 15px 15px;
      background: url("../image/text_bgd.png");
      background-size: 100% 100%;
      background-repeat: no-repeat;
      height: calc(100vh - 2.7rem);
    }

    .updata_box {
      display: flex;
      align-items: center;
    }

    .clock_img {
      margin: -0.02rem .1rem 0 0;
      width: .28rem;
      height: .28rem;
    }

    .clock_img img {
      width: 100%;
      height: 100%;
    }

    .clock_text {
      height: .5rem;
      line-height: .5rem;
    }

    .abstract {
      position: absolute;
      top: 1.7rem;
      right: -1.3rem;
      text-align: center;
      font-size: 12px;
      width: 2rem;
      height: .8rem;
      /* z-index: 9999; */
      border-radius: 10px;
      color: #fff;
      line-height: 1.4;
      display: flex;
      justify-content: center;
      align-items: center;
      transition: all .5s;
    }

    .abstractUnfold {
      right: 0;
      transition: all .5s;
    }

    .abstract .znzy {
      width: 100%;
      height: 100%;
      background: url(../image/hyjy.png) no-repeat;
      background-size: 100% 100%;
      display: flex;
      align-items: center;
      padding-left: 6px;
    }

    .abstract .znzy img {
      width: .5rem;
      height: .5rem;
    }

    .content-abstract {
      height: 40vh;
      overflow: auto;
      border: none;
      margin: 0;
    }

    .dialog-title {
      padding: 0.3rem;
      border-bottom: 1px solid #eee;
      text-align: center;
    }

    .dialog-content {
      padding: 0.3rem;
      line-height: 1.5;
    }

    .dialog-foot {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0.3rem;
    }

    .dialog-foot-icon {
      margin-right: 0.4rem;
    }

    .dialog-foot-icon:nth-child(3),
    .dialog-foot-icon:nth-child(4) {
      width: .96rem;
      height: .56rem;
      margin-right: 0;
    }

    .dialog-foot-icon:nth-child(3) {
      margin-right: 0.2rem;
    }

    .editBtn {
      width: 45%;
      height: 36px;
    }

    /* 音频 */
    .audioControl {
      background-color: #f9fbfa;
      width: 100%;
      height: 1.7rem;
      display: flex;
      align-items: center;
      /* border-radius: .3rem .3rem 0 0; */
    }

    .audioSrc_loading {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      height: 1.7rem;
    }

    .musicPlay {
      display: flex;
      width: 100%;
      /* height: 70px; */
    }

    .playControl {
      display: flex;
      align-items: center;
      user-select: none;
      width: 100%;
      /* margin-top: 12px; */
      justify-content: space-between;
      /* padding-top: 5px; */
      padding-left: 5px;
      /* width: 320px;
            height: 40px; */
    }

    .audioVolSpan {
      margin-right: 10px;
      margin-left: 32%;
    }

    .audioSpan,
    .audioVolSpan {
      color: #333;
      font-size: 24px;
      /* margin-right: 30px; */
      cursor: pointer;
    }

    .van-dropdown-item__content {
      width: 1.2rem;
      /* 设置你想要的宽度 */
    }

    .van-ellipsis {
      font-size: 16px;
      font-weight: bold;
    }

    .van-dropdown-menu__bar {
      box-shadow: none;
      background-color: #f9fbfa;
    }

    .van-dropdown-item__content .van-cell {
      background: #f9fbfa;
    }

    .van-dropdown-menu__title::after {
      border: none;
    }

    .van-overlay {
      /* background: none !important; */
      top: -.2rem;
      left: 0;
    }

    .van-popup--bottom {
      bottom: 0.2rem;
      left: 0.2rem;
      /* border:1px solid #ccc; */
    }
  </style>
</head>

<body>

  <div v-cloak id="app">
    <div class="is-loading">
      <div class="is-loading">
        <div class="curtain" id="curtain">
          <div class="loadingBgc">
            <div class="loader"></div>
          </div>
        </div>
      </div>
    </div>

    <div class="aaa">
      <div class="trainTicketstitle" style="padding:0px">
        <div class="header_tit">
          <van-nav-bar title="智能会议" left-arrow>
            <template #left>
              <div class="back_l" @click="home"><img src="../image/left.png" alt=""></div>
            </template>

          </van-nav-bar>
        </div>
      </div>
      <div class="content_wrapper">
        <!-- <van-skeleton title :row="3" :loading="initLoading"> -->
          <div class="header_title">
            <div class="head_warp"
              style="display: flex;flex-direction: column;width: 100%;padding: .5rem .5rem 0;height: 2rem;">
              <div class="updata_box" v-if="!showVoice">
                <p class="clock_text" v-text="this.titlt_time"> </p>
              </div>
              <div class="titleName">{{ filteredFileName | textNum }}</div>
            </div>
          </div>
        <!-- </van-skeleton> -->
        <van-divider></van-divider>
        <div class='form'>
          <!--:readonly="readonly" -->
          <div class='clipboardContent' id="clipboardContent">
            <!-- @touchmove="stopAutoScroll" -->
            <textarea :readonly="readonly" placeholder=" 注：录制期间请保持手机屏幕常亮，不要切出录制页面，录制时长不超过4小时。" class="output_box" type="text"
              v-model="content" id='output_box'></textarea>
            <div
              style=" display: flex; align-items: center;padding-left: 98%;padding-right: 0px;height: 0px;width: 0px;"
              @mousedown="isDraging = true" @mouseup="isDraging = false">
              <van-slider v-model="playProcess" button-size="12px" active-color="rgb(185, 235, 245)" vertical
                style="height: 53vh !important;width: 1%;position: fixed;top: 4.2rem;margin-left: 5px;z-index: 99;"
                @change="setProcessFunc" />
            </div>
          </div>
        </div>
      </div>
      <van-popup style="min-height: 4rem;" :close-on-click-overlay="false" v-model="showPop">
        <van-form>
          <div style="text-align: center;font-size: 18px;font-weight:bold;">结束录音</div>
          <div style="text-align: center;font-size: 14px;color:#ccc;margin-top: 8px;">是否结束会议记录并保存</div>
          <van-field v-model="inputText" class="edit_title_input" placeholder="请输入标题" maxlength="100" />
        </van-form>
        <div class="form_btn">
          <van-button type="default" size='10px' round @click="del">取消</van-button>
          <van-button type="primary" size='10px' color="#13C09B" round @click="confirm(1)">确定</van-button>
        </div>
      </van-popup>
      <div v-cloak class='foot'>
        <div v-if="showVoice" class="Btn">
          <div class='shorthand'>
            <ul>
              <li class='uldis'>
                <div class="liner-box" v-if='checkClick == 1'>
                  <!-- <div class="liner-box" v-show='flag==false'> -->
                  <span class="lines">
                    <hr class="hr hr1">
                    <hr class="hr hr2">
                    <hr class="hr hr3">
                    <hr class="hr hr4">
                    <hr class="hr hr5">
                    <hr class="hr hr6">
                    <hr class="hr hr7">
                    <hr class="hr hr8">
                    <hr class="hr hr9">
                    <hr class="hr hr10">
                    <hr class="hr hr11">
                    <hr class="hr hr12">
                    <hr class="hr hr13">
                    <!-- <hr class="hr hr14">
                      <hr class="hr hr15">
                      <hr class="hr hr16">
                      <hr class="hr hr17">
                      <hr class="hr hr18">
                      <hr class="hr hr19">
                      <hr class="hr hr20"> -->
                    <!-- <hr class="hr hr21">
                      <hr class="hr hr22">
                      <hr class="hr hr23"> -->
                  </span>
                </div>
                <div class="lines1" v-if='checkClick == 0'>
                  <!-- <div class="lines1" v-show='flag==true'> -->
                </div>
                <div class='time'>
                  <ul>
                    <li>{{one}}<span>:</span>{{two}}<span>:</span>{{three}}</li>
                  </ul>
                </div>
              </li>
            </ul>
          </div>
          <div class="btn_r">
            <div class="img_box">
              <img src="../image/luyin_bf.png" alt="" class='start active-brightness' @click='getMeToken()'
                v-if='checkClick == 0'>
              <img src="../image/luyilu_STOP.png" alt="" class='start active-brightness' @click='stopRecorder()'
                v-if='checkClick == 1'>
            </div>
            <div class="last_Btn" @click="openPop">
              <img class='start' src="../image/luyilu_dui.png" alt="">
            </div>
          </div>
        </div>

        <div v-else class="Btn">
          <div v-if="audioSrc" class="musicPlay">
            <audio ref="audio" id="course-aud" @play="playFunc" @pause="pauseFunc" @timeupdate="timeupdateFunc"
              @waiting="waitingFunc" preload="auto" @canplay="canplayFunc" @error="errorFunc" :src="audioSrc">
            </audio>
            <div class="audioControl">
              <div class="playControl">
                <van-dropdown-menu active-color="#1989fa" direction="up">
                  <van-dropdown-item v-model="playSpeed" :options="speedList" @change="clickFunc('speed')" />
                </van-dropdown-menu>

                <div class="audioSpan" @click="skipTime(-5)" style="width: 0.5rem;height: 0.54rem;">
                  <img style="width: 100%; height: 100%;" src="../image/speed2.png" alt="">
                </div>
                <span class="audioSpan" @click="clickFunc('play')" v-show="!isPlaying"
                  style="margin: 0 .3rem;width: 1rem;height: 1rem;">
                  <img style="width: 100%; height: 100%; " src="../image/luyin_bf.png" alt="">
                </span>
                <span class="audioSpan" @click="clickFunc('pause')" v-show="isPlaying" style="
                        margin: 0 .3rem;width: 1rem;height: 1rem;">
                  <img style="width: 100%; height: 100%;" src="../image/luyilu_STOP.png" alt="">
                </span>

                <span class="audioSpan" @click="skipTime(5)" style="margin-right: .3rem;width: 0.5rem;height: 0.54rem;">
                  <img style="width: 100%; height: 100%;" src="../image/speed1.png" alt="">
                </span>

                <div style="display: flex; align-items: center;height: 60px;width: 60px;">
                  <div style="color: #333; text-align: center;font-size: 12px;">
                    {{ formatCurrentTime }}
                    <div
                      style="height: 1px;width:35px;background: rgba(255,255,255,1);border: none;border-top: 1px solid #555555;">
                    </div>
                    {{ formatDuration }}
                  </div>
                </div>

              </div>
            </div>
          </div>
          <div v-else class="audioSrc_loading">
            <van-loading size="14" />
            <span>正在加载音频文件</span>
          </div>

        </div>

      </div>
    </div>
  </div>

  <script>
    function toStringFunc(param) {
      if (param > 9) {
        return param + ''
      } else {
        return '0' + param
      }
    }
    new Vue({
      el: '#app',
      data() {
        return {
          initLoading: true, //骨架屏
          showDialog: false,
          abstractContent: '',
          abstractContentOriginal: '',
          abstractLoading: false,
          abstractUnfold: false,
          freshAbstractWarning: false,
          isEditAbstract: false,
          autoScroll: true,
          isflageIOX: true,
          titleText: '',
          inputText: '',
          showInputBtn: false,
          checkClick: 1, // 点击开始是1, 点击暂停是0
          countDown: 0,
          countDowntime: null,
          time: null,
          one: '00', // 时
          two: '00', // 分    
          three: '00', // 秒
          abc: 0,
          cde: 0,
          efg: 0,
          flag: false,
          ticket: '',
          input: '',
          content: '',
          myWebsocket: null,
          Websocket: null,
          BUFFER_SIZE: 512,
          INPUT_CHANNELS: 1,
          OUTPUT_CHANNELS: 1,
          SAMPLE_SIZE: 16,
          SAMPLE_RATE: 16 * 1000,
          FFT_SIZE: 2048,
          MODEL_CODE: '1888',
          CAPACITY_CODE: '010115',
          LANG: 'zh',
          WS_URL: '',
          TIME: new Date(),
          checkSwitch: false,
          VoiceItem: {},
          voiceTxt: {
            old: '',
            ind: null
          },
          inputDom: null,
          oldText: '',
          oldTextitle: '',
          bufferData: [],
          showPop: false,
          currentIndex: 0,
          readonly: true,
          backNum: false,
          showVoice: false,
          showToggle: false,
          fileTime: null,
          VoiceItemID: "",
          countFlage: false,
          titlt_time: '',
          count: 0,
          FullYear: new Date().getFullYear(),
          Month: new Date().getMonth() + 1,
          Dates: new Date().getDate(),
          changeID: this.generateUUID(),
          audioSrc: '',
          speedList: [{
            value: 3,
            text: '3x',
          }, {
            value: 2,
            text: '2x',
          }, {
            value: 1.5,
            text: '1.5x',
          }, {
            value: 1,
            text: '1.0x',
          }, {
            value: 0.75,
            text: '0.75x',
          }, {
            value: 0.5,
            text: '0.5x',
          }],
          playProcess: 0,
          playSpeed: 1,
          totalTimes: '00:00',
          currentTime: '00:00',
          isPlaying: false,
          isDraging: false,
          changearr: [],
          audioExtensions: [
            '.mp3', '.wav', '.pcm', '.amr', '.m4a',
            '.MP3', '.WAV', '.PCM', '.AMR', '.M4A'
          ]
        }
      },
      watch: {

      },

      created() {
      
        $.getScript("../js/jweixin-sgccigw-1.0.0.js" /*"js/jweixin-1.0.0.js"*/ , () => {
          let jsApiList = [];
          let this_r = this
          wx.ready(() => {
            // let myDate = this.TIME
            var url = location.search
            var str = window.sessionStorage.getItem("OnSiteShorthandItem")
            if (str) {
              this_r.showVoice = false
              this_r.backNum = true
              this_r.VoiceItem = window.sessionStorage.getItem("OnSiteShorthandItem")
              this_r.VoiceItem = JSON.parse(this_r.VoiceItem)
              this_r.VoiceItemID = this_r.VoiceItem.id
              this_r.subStance(this_r.VoiceItemID)
              this_r.showToggle = this_r.VoiceItem.translation == 1
            } else {
              this_r.VoiceItemID = this_r.changeID
              this_r.showVoice = true
              this_r.titleText = this_r.dateTimeText(new Date().getTime(),1) + '工作会议';
              mui.toast('开始录音', {
                duration: 1300,
                type: 'div'
              })
              this_r.getMeToken()
            }
            wx.onHistoryBack(() => {
              if (this.content != this.oldText && !this.readonly) {
                var btnArray = ["取消", "确定"];
                var i = 0
                mui.confirm(
                  "是否进行保存？",
                  "消息提醒",
                  btnArray,
                  (e) => {
                    if (i > 0) return
                    i++
                    if (e.index == 1) {
                      this_r.time = clearInterval(this_r.time)
                      this_r.fileTime = clearInterval(this_r.fileTime)
                      this_r.complete(1)
                    } else {
                      this_r.time = clearInterval(this_r.time)
                      this_r.fileTime = clearInterval(this_r.fileTime)
                      // this_r.stopRecorder(1)
                      this_r.stopRecorder(1)
                    }
                  }
                );
                return false
              } else {
                this_r.time = clearInterval(this_r.time)
                this_r.fileTime = clearInterval(this_r.fileTime)
                this_r.stopRecorder(6)
              }
            });
          });
          jsApiList = [
            'startRecordVoiceBuffer',
            'ext_AudioRecorder_Start',
            'ext_AudioRecorder_Stop',
            'onRecordBufferReceived',
            'multiWindows_subscribe',
            'stopRecord',
            "onHistoryBack"
          ];
          wx.config({
            beta: true,
            debug: false,
            appId: "ww4d11a39991ebffdc",
            timestamp: '1639582452',
            nonceStr: "AMQGnmTMzhJetshY",
            signature: 'fb9f560a9b4824f7db3525926994010de74ea055',
            jsApiList: jsApiList
          });
        });

      },

      beforeDestroy() {
        this.time = clearInterval(this.time)
        this.fileTime = clearInterval(this.fileTime)
        this.stopRecorder(1)
      },
      mounted() {
        this.compatibleInput()
        this.$nextTick(() => {
          this.inputDom = document.getElementById("output_box")
          // this.testMsg()
        })
        // setTimeout(() => {

        // }, 1000)image.png
      },
      filters: {
        textNum: (value) => {
          if (!value) return "";
          let data = value.split("");
          if (data.length < 30) {
            return value;
          }
          return value.slice(0, 30) + "...";
        },

        timeNum: (value) => {
          if (!value) return "";
          let data = value.split("");
          if (data.length < 15) {
            return value;
          }
          return value.slice(0, 15) + "...";
        },
      },
      computed: {

        // 计算属性：实时过滤文件名后缀
        filteredFileName() {
          let fileName = this.titleText.trim();

          // 逐个检查并移除匹配的后缀
          for (const ext of this.audioExtensions) {
            if (fileName.endsWith(ext)) {
              return fileName.slice(0, -ext.length);
            }
          }

          return fileName;
        },
        formatDuration() {
          if (typeof this.totalTimes === 'number') {
            const fTotal = Math.floor(this.totalTimes)
            const tempMin = Math.floor(fTotal / 60)
            const tempSec = fTotal % 60
            return `${toStringFunc(tempMin)} : ${toStringFunc(tempSec)}`
          }
          return '00 : 00'
        },
        formatCurrentTime() {
          if (typeof this.currentTime === 'number') {
            const fTotal = Math.floor(this.currentTime)
            const tempMin = Math.floor(fTotal / 60)
            const tempSec = fTotal % 60
            return `${toStringFunc(tempMin)} : ${toStringFunc(tempSec)}`
          }
          return '00 : 00'
        }
      },
      methods: {
        confirm() {
          if (!this.inputText || this.inputText.split(" ").join("").length == 0) {
            mui.toast('标题不能为空', {
              duration: 'long',
              type: 'div'
            })
            return
          }
          this.titleText = this.inputText
          this.showPop = false;
          this.complete(1)
        },
        generateUUID() {
          var d = new Date().getTime(); //Timestamp
          var d2 = (performance && performance.now && (performance.now() * 1000)) ||
          0; //Time in microseconds since page-load or 0 if unsupported
          return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
            var r = Math.random() * 16; //random number between 0 and 16
            if (d > 0) { //Use timestamp until depleted
              r = (d + r) % 16 | 0;
              d = Math.floor(d / 16);
            } else { //Use microseconds since page-load if supported
              r = (d2 + r) % 16 | 0;
              d2 = Math.floor(d2 / 16);
            }
            return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16);
          });
        },
        createNonceStr(len) {
          var e = len ? len : 16;
          var t =
            "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
            a = t.length,
            n = "";
          for (i = 0; i < e; i++)
            n += t.charAt(Math.floor(Math.random() * a));
          return n;
        },
        // 判断安卓还是ios
        compatibleInput() {
          //获取浏览器的userAgent,并转化为小写
          var ua = navigator.userAgent.toLowerCase();
          //判断是否是苹果手机，是则是true
          var isIos = ua.indexOf("iphone") != -1 || ua.indexOf("ipad") != -1;
          if (isIos) {
            this.isflageIOX = true
          } else {
            this.isflageIOX = false
          }
        },
        delAdd(id) {
          userId = sessionStorage.getItem("userId");
          if (sessionStorage.getItem("iscp_port")) {
            iscp_port = sessionStorage.getItem("iscp_port");
          } else {
            iscp_port = ""
          }
          let data = {
            "id": id, //单位id
            "userId": userId,
            "timestamp": new Date().getTime() + ""
          };
          data = JSON.stringify(data)
          let sign = sm3(data);
          let AuthenticationSession = sessionStorage.getItem("Authentication");
          $.ajax({
            url: localUrlLink + iscp_port + "/tjAiAssistant/voice/deleteVoiceNotes",
            type: "post",
            async: false, //是否同步，false表示同步请求
            dataType: "json",
            data: data,
            headers: {
              "Content-Type": "application/json;charset=UTF-8",
              Authentication: AuthenticationSession,
              sign: sign
            },
            success: (res, txt, xhr) => {
              $(location).attr("href", "voiceRecordingList.html");
            },
            error: (e) => {},
          });
        },
        editBtn() {
          this.readonly = false
          mui.toast('已处于可编辑状态', {
            duration: 'long',
            type: 'div'
          })
        },
        del() {
          this.showPop = false;
        },
        openPop() {
          this.inputText = this.filteredFileName
          this.showPop = true
        },
        countDownFun() {
          this.complete(2)
          this.fileTime = setInterval(() => {
            if (this.countFlage) {
              this.complete(2)
            }
          }, 30000)
        },
        getMeToken() {
          let _that = this
          _that.countFlage = true,
            _that.countDownFun()
          _that.voiceTxt.ind = null
          var iscp_port = ''
          if (sessionStorage.getItem("iscp_port")) {
            iscp_port = sessionStorage.getItem("iscp_port");
          }
          userId = sessionStorage.getItem("userId");
          let AuthenticationSession = sessionStorage.getItem("Authentication");
          let timestamp = new Date().getTime() + ""
          let data = {
            "userId": userId,
            "timestamp": timestamp,
          }
          const datas = JSON.stringify(data)
          let sign = sm3(datas);
          $.ajax({
            url: localUrlLink + iscp_port + "/tjAiAssistant/soundRecording/thirdparty",
            type: "post",
            async: false, //是否同步，false表示同步请求
            dataType: "json",
            data: datas,
            headers: {
              "Content-Type": "application/json;charset=UTF-8",
              sign: sign,
              Authentication: AuthenticationSession,
            },
            success: (res, txt, xhr) => {
              _that.initLoading = false
              if (sm3(res.resultValueStr) == xhr.getResponseHeader("sign")) {
                let Authentication = xhr.getResponseHeader("Authentication")
                if (res.code == 200 && Authentication) {
                  sessionStorage.setItem("Authentication", Authentication);
                  _that.backNum = true
                  _that.WS_URL =
                    `ws://127.0.0.1:${iscp_port}/websocket/asr/i?token=${res.resultValue}&capacityCode=${_that.CAPACITY_CODE}&language=${_that.LANG}&code=${_that.MODEL_CODE}&sessionId=${_that.VoiceItemID}`
                  if (!('WebSocket' in window)) {
                    return
                  }
                  if (_that.count < 1) {
                    wx.invoke("multiWindows_subscribe", {
                      channelId: _that.VoiceItemID
                    }, function (res) {
                      // console.log(res.data.message, "信息")
                      if (res.data.method == "onMessage String" && res.data.channelId == _that
                        .VoiceItemID) {
                        _that.onMessage(res)
                      } else if (res.data.method == 'onReconnectFinishAndDisconn') {
                        //重连失败处理
                        _that.stopVB()
                      }
                    });
                  }
                  _that.count++
                  // console.log(_that.WS_URL, "_that.WS_URL")
                  //1.开始录音
                  wx.invoke("ext_AudioRecorder_Start", {
                      data: {
                        channelId: _that.VoiceItemID,
                        socketUrl: _that.WS_URL
                      }
                    },
                    function (res) {
                      if (res.err_msg === 'ext_AudioRecorder_Start:ok') {
                        //成功处理
                        _that.checkClick = 1
                        _that.startTime()
                        _that.checkSwitch = true
                      }

                      if (res.err_msg === 'ext_AudioRecorder_Start:fail') {
                        //失败处理
                      }
                      if (res.err_msg === 'ext_AudioRecorder_Start:cancel') {
                        //取消处理
                      }
                      if (res.err_msg === 'ext_AudioRecorder_Start:not_support ') {}
                    })
                } else {
                  mui.toast(res.resultValue, {
                    duration: 'long',
                    type: 'div'
                  })
                }

              }
            },
            error: (e) => {
              _that.initLoading = false
              mui.toast('请求异常,请稍后再试', {
                duration: 1000,
                type: 'div'
              })
            },
          })
        },
        startTime() {
          this.time = setInterval(() => {
            this.countDown++
            if (this.three === 59 || this.three === '59') {
              this.three = '00';
              this.abc = 0;
              if (this.two === 59 || this.two === '59') {
                this.two = '00';
                this.cde = 0;
                if (this.efg + 1 <= 9) {
                  this.efg++;
                  this.one = '0' + this.efg;
                } else {
                  this.efg++;
                  this.one = this.efg;
                }
              } else {
                if (this.cde + 1 <= 9) {
                  this.cde++;
                  this.two = '0' + this.cde;
                } else {
                  this.cde++;
                  this.two = this.cde;
                }
              }
            } else {
              if (this.abc + 1 <= 9) {
                this.abc++;
                this.three = '0' + this.abc;
              } else {
                this.abc++;
                this.three = this.abc;
              }
            }
          }, 1000)
        },

        onOpen(evt, way, afterOpen) {
          let _that = this
          this.checkSwitch = true
          wx.startRecordVoiceBuffer({
            maxDuration: 100000000,
            sampleRate: 16000
          });
          wx.onRecordBufferReceived(function (res) {
            if (_that.isflageIOX) {
              var a = ''
              if (_that.bufferData.length == 26) {
                _that.bufferData.forEach((item) => {
                  a += item
                  _that.bufferData = []
                })
                // _that.stopRecorder()
                _that.doSend(a);
              } else {
                _that.bufferData.push(res.buffer)
              }
            } else {

              _that.doSend(res.buffer);
            }
          })
          this.startTime()
          // this.flag = false
          if (!$(this).hasClass("stop")) {
            $(this).addClass("stop");
            let i = 0;
            $(this).data("interval", window.setInterval(function () {
              $(".record-time").html((++i) + "s");
            }, 1000, i));
          }
        },
        onClose(evt) {
          this.stopRecorder()
        },
        onError(evt) {
          throw new Error('websocket连接失败' + evt.data);
        },
        doSend(message) {
          this.myWebsocket.readyState === 1 && this.myWebsocket.send(message);
        },
        stopAutoScroll() {
          this.autoScroll = false
          setTimeout(() => {
            this.autoScroll = true
          }, 800)
        },
        onMessage(evt) {
          try {
            // const data = JSON.parse(evt.data);
            const data = JSON.parse(evt.data.message);
            // console.log(evt.data,"内容")
            if (data.code == 200) {
              if (this.voiceTxt.ind == null) {
                this.voiceTxt.ind = this.content.length
                // this.voiceTxt.ind = this.inputDom.selectionStart
                this.voiceTxt.old = ''
              }
              var allow = false
              if (this.inputDom.clientHeight * 4 / 3 + this.inputDom.scrollTop > this.inputDom.scrollHeight) {
                allow = true
              }
              // 这一行是赋值的
              data.word = data.word.replace(/[|]/g, '\n')
              data.word = data.word.replace(/[\n]/g, '\n\n')
              this.insertContent(data.word)
              if (allow && this.autoScroll) {
                setTimeout(() => {
                  this.inputDom.scrollTop = this.inputDom.scrollHeight
                })
              }
              if (data.completed == true) {
                this.voiceTxt.ind += data.word.length
                this.voiceTxt.old = ''
                this.inputDom.setSelectionRange(this.voiceTxt.ind, this.voiceTxt.ind)
                setTimeout(() => {
                  this.inputDom.setSelectionRange(this.voiceTxt.ind, this.voiceTxt
                    .ind)
                });
              }
            } else if (data.code == 'E000004') {
              mui.toast("当前已达到最大并发量限制,请稍后再试", {
                duration: 'long',
                type: 'div'
              })
              this.stopRecorder()
            } else {
              mui.toast(data.code + "语音服务异常", {
                duration: 'long',
                type: 'div'
              })
              this.stopRecorder()
            }
          } catch (error) {
            throw new Error('解析错误!' + error);
          }
        },
        insertContent(txt) {
          const content = this.content
          const startIndex = this.voiceTxt.ind
          const delLength = this.voiceTxt.old.length
          this.content = this.insertTxt(content, startIndex, txt, delLength)
          this.voiceTxt.old = txt
          this.$nextTick(() => {
            this.inputDom.setSelectionRange(this.voiceTxt.ind + txt.length, this.voiceTxt
              .ind + txt.length)
          })
        },
        insertTxt(content, index, txt, del) {
          let arr = content.split('')
          arr.splice(index, del, txt)
          return arr.join('')
        },
        stopRecorder(num) {
          let _this = this
          wx.invoke("ext_AudioRecorder_Stop", {
              data: {}
            },
            function (res) {
              if (res.err_msg === 'ext_AudioRecorder_Stop:ok') {
                _this.stopVB(num)
              }
              if (res.err_msg === 'ext_AudioRecorder_Stop:fail') {
                //失败处理
                console.log(res);
              }
              if (res.err_msg === 'ext_AudioRecorder_Stop:cancel') {
                //取消处理
                console.log(res);
              }
              if (res.err_msg === 'ext_AudioRecorder_Stop:not_support ') {
                _this.stopVB(num)
                wx.stopRecordVoiceBuffer({});
                // if (_this.myWebsocket) {
                _this.myWebsocket.close();
              }
            })
        },
        stopVB(num) {
          //成功处理
          this.time = clearInterval(this.time)
          this.fileTime = clearInterval(this.fileTime)
          this.countFlage = false
          // this.flag = true
          this.checkSwitch = false
          // this.countDown = 0
          this.checkClick = 0
          if (num == 6) {
            this.complete(2, "", 2)
            return false
          }
          if (num == 3) {
            return false
          }
          if (num && this.showVoice) {
            this.delAdd(this.VoiceItemID)
          } else if (!this.showVoice) {
            $(location).attr("href", "voiceRecordingList.html");
          } else {
            this.complete(2)
          }
          $(this).removeClass("stop");
          window.clearInterval($(this).data("interval"));
          $(".record-time").html("");
        },
        home() {
          if (this.content == this.oldText) {
            // $(location).attr("href", "voiceRecordingList.html");
            this.time = clearInterval(this.time)
            this.fileTime = clearInterval(this.fileTime)
            this.countFlage = false
            this.stopRecorder(1)
          } else if (!this.backNum) {
            $(location).attr("href", "voiceRecordingList.html");
          } else if (this.content != this.oldText && !this.readonly) {
            var btnArray = ["取消", "确定"];
            var i = 0
            mui.confirm(
              "是否进行保存？",
              "消息提醒",
              btnArray,
              (e) => {
                if (i > 0) return
                i++
                if (e.index == 1) {
                  this.time = clearInterval(this.time)
                  this.fileTime = clearInterval(this.fileTime)
                  this.countFlage = false
                  this.complete(1)
                } else {
                  this.time = clearInterval(this.time)
                  this.fileTime = clearInterval(this.fileTime)
                  this.countFlage = false
                  this.stopRecorder(1)
                }
              }
            );
          } else {
            this.time = clearInterval(this.time)
            this.fileTime = clearInterval(this.fileTime)
            this.countFlage = false
            this.complete(1, "", 2)
          }
        },
        dateTimeText(value,num) {
          if (!value || new Date(value) == 'Invalid Date') return "";
          const date = new Date(value)
          const currentY = new Date().getFullYear()
          const Y = date.getFullYear()
          const M = date.getMonth() + 1
          const D = date.getDate()
          const h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
          const m = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
          const s = date.getSeconds()
          if (currentY === Y) {
            return num ? `${Y}.${M}.${D} ${h}:${m}:${s}` : `${Y}年${M}月${D}日 ${h}:${m}` 
          } else {
            return `${Y}年${M}月${D}日 ${h}:${m}`
          }
        },
        subStance(id) {
          this.titleText = ''
          this.oldTextitle = ''
          userId = sessionStorage.getItem("userId");
          if (sessionStorage.getItem("iscp_port")) {
            iscp_port = sessionStorage.getItem("iscp_port");
          } else {
            iscp_port = ""
          }
          const timestamp = new Date().getTime() + ""
          let data = {
            "id": id,
            "section": 0,
            "userId": userId,
            "timestamp": timestamp,
          };
          let AuthenticationSession = sessionStorage.getItem("Authentication");
          data = JSON.stringify(data)
          let sign = sm3(data);
          $.ajax({
            url: localUrlLink + iscp_port + "/tjAiAssistant/voice/selectByIdVoiceNotes",
            type: "post",
            async: false, //是否同步，false表示同步请求
            dataType: "json",
            data: data,
            headers: {
              "Content-Type": "application/json;charset=UTF-8",
              Authentication: AuthenticationSession,
              sign: sign
            },
            success: (res, txt, xhr) => {
              this.initLoading = false
              if (sm3(res.resultValueStr) == xhr.getResponseHeader("sign")) {
                let Authentication = xhr.getResponseHeader("Authentication")
                if (res.code == 200) {
                  if (Authentication) {
                    sessionStorage.setItem("Authentication", Authentication);
                    this.content = res.resultValue.message
                    this.oldText = res.resultValue.message
                    this.titleText = res.resultValue.messageTitle

                    this.oldTextitle = res.resultValue.messageTitle
                    this.countDown = res.resultValue.voiceDuration
                    this.titlt_time = this.dateTimeText(res.resultValue.updateTime)
                  }
                  //判断状态 是否有音频id
                  if (res.resultValue.attachmentId) {
                    let voiceSign = sm3(timestamp + "&" + res.resultValue.id);
                    this.audioSrc = localUrlLink + iscp_port +
                      `/tjAiAssistant/voice/getAudioById?Authentication=${Authentication}&id=${res.resultValue.id}&sign=${voiceSign}&timestamp=${timestamp}`
                  } else {
                    setTimeout(() => {
                      this.subStance(id)
                    }, 5000)
                  }
                } else {
                  mui.toast(res.resultValue, {
                    duration: 'long',
                    type: 'div'
                  })
                }
              } else {
                mui.toast('完整性校验失败', {
                  duration: 'long',
                  type: 'div'
                })
              }

            },
            error: (e) => {
              mui.toast('请求异常,请稍后再试', {
                duration: 'long',
                type: 'div'
              })
            },
          });
        },

        // 开始
        playFunc() {
          this.playPause();
          this.isPlaying = true
          this.$emit('play', this.isPlaying)
        },
        // 暂时
        pauseFunc(e) {
          // console.log('music is paused')
          this.isPlaying = false
          this.$emit('pause', this.isPlaying)
          clearInterval(this.cursorTimer);
        },
        waitingFunc(e) {
          this.isLoading = true;
        },
        timeupdateFunc(e) {
          if (!this.isDraging) {
            this.playProcess = (e.target.currentTime / this.totalTimes) * 100
            this.currentTime = e.target.currentTime
          }
          this.$emit('timeupdate', this.currentTime, this.playProcess)
          this.isLoading = false;
        },
        async canplayFunc(e) {
          const firsthandAudio = e.target;
          while (firsthandAudio.duration === Infinity) {
            await new Promise(r => setTimeout(r, 200));
            firsthandAudio.currentTime = 10000000 * Math.random();
          }
          this.totalTimes = firsthandAudio.duration;
          // this.$refs.audio.volume = 0.5
        },
        errorFunc(e) {
          this.isError = true
        },
        skipTime(seconds) {
          const audio = this.$refs.audio;
          var time = audio.currentTime + seconds;
          this.$refs.audio.currentTime = time
        },
        clickFunc(val) {
          if (val === 'play') {
            this.isPlaying = !this.isPlaying
            this.$refs.audio.play()
          } else if (val === 'pause') {
            this.isPlaying = !this.isPlaying
            this.$refs.audio.pause()
          } else if (val === 'speed') {
            this.$refs.audio.playbackRate = this.playSpeed
          } else if (val === 'forward') {
            // 减慢音频播放速度，速率范围[0.5，2]
            if (this.playSpeed < 2) {
              this.playSpeed += 0.5
              this.$refs.audio.playbackRate = this.playSpeed
            }
          } else if (val === 'refresh') {
            this.$refs.audio.playbackRate = 1
            this.playSpeed = 1
            this.$refs.audio.load()
            this.$refs.audio.play()
          }
        },
        setProcessFunc(val) {
          this.$refs.audio.currentTime = Math.round((val / 100) * this.totalTimes)
          this.$refs.audio.play()
        },
        playPause() {
          if (!this.isPlaying) {
            clearInterval(this.cursorTimer);
            this.$refs.audio.pause();
          } else {
            this.cursorTimer = setInterval(this.updateCursor, 100);
            this.$refs.audio.play();
          }
        },
        updateCursor() {
          var audioDuration = this.$refs.audio.duration;
          var currentTime = this.$refs.audio.currentTime;
        },

        // 修改接口
        getreviseVoice(id, messageTitle, message, timestamp, num, type, backid) {
          userId = sessionStorage.getItem("userId");
          const orgId = sessionStorage.getItem("unitId")
          if (sessionStorage.getItem("iscp_port")) {
            iscp_port = sessionStorage.getItem("iscp_port");
          } else {
            iscp_port = ""
          }
          let data = {
            "id": id, //主键id
            "messageTitle": messageTitle, //笔记标题
            "message": message, //笔记内容
            "userId": userId,
            "orgId": orgId,
            "voiceDuration": this.countDown,
            "isLast": num,
            "timestamp": timestamp,
          };
          let AuthenticationSession = sessionStorage.getItem("Authentication");
          data = JSON.stringify(data)
          let sign = sm3(data);
          $.ajax({
            url: localUrlLink + iscp_port + "/tjAiAssistant/voice/saveVoiceNotes",
            type: "post",
            async: false, //是否同步，false表示同步请求
            dataType: "json",
            data: data,
            headers: {
              "Content-Type": "application/json;charset=UTF-8",
              Authentication: AuthenticationSession,
              sign: sign
            },
            success: (res, txt, xhr) => {
              $(".curtain").css("display", "none");
              if (sm3(res.resultValueStr) == xhr.getResponseHeader("sign")) {
                let Authentication = xhr.getResponseHeader("Authentication")
                if (res.code == 200) {
                  if (Authentication) {
                    $(".curtain").css("display", "none");
                    sessionStorage.setItem("Authentication", Authentication);
                    if (num == 1) {
                      this.time = clearInterval(this.time)
                      this.fileTime = clearInterval(this.fileTime)
                      this.countFlage = false
                      // mui.toast('已保存', {
                      //   duration: 'long',
                      //   type: 'div'
                      // })
                      this.stopRecorder(3)
                      if (type == 'editBtn') {
                        return false
                      }
                      setTimeout(() => {
                        if (backid) {
                          $(location).attr("href", "voiceRecordingList.html");
                          return
                        }
                        $(location).attr("href", "voiceRecordingList.html");
                      }, 500)
                    }
                  }
                } else {
                  if (num != 1) {
                    return
                  }
                  mui.toast(res.resultValue, {
                    duration: 'long',
                    type: 'div'
                  })
                }
              } else {
                if (num != 1) {
                  return
                }
                mui.toast('完整性校验失败', {
                  duration: 'long',
                  type: 'div'
                })
              }
            },
            error: (e) => {
              $(".curtain").css("display", "none");
              if (num != 1) {
                return
              }
              mui.toast('请求异常,请稍后再试', {
                duration: 1000,
                type: 'div'
              })
            },
          });
        },
       
        // 开始生成摘要
        startAbstract(flag) {
          this.abstractLoading = true
          if (sessionStorage.getItem("iscp_port")) {
            iscp_port = sessionStorage.getItem("iscp_port");
          } else {
            iscp_port = ""
          }
          let data = {
            id: this.VoiceItemID,
            timestamp: new Date().getTime() + ""
          }
          data = JSON.stringify(data)
          let sign = sm3(data)
          $.ajax({
            // url: localUrlLink + iscp_port + "/tjAiAssistant/voice/textDigest1",
            url: localUrlLink + iscp_port + "/tjAiAssistant/digest/selectDigestById",
            type: "post",
            async: false, //是否同步，false表示同步请求
            dataType: "json",
            data: data,
            headers: {
              "Content-Type": "application/json;charset=UTF-8",
              sign: sign,
              Authentication: sessionStorage.getItem("Authentication"),
            },
            success: (res, txt, xhr) => {
              if (res.code == 200) {
                // console.log(res)
                if (res.resultValue.digestState == -1) {
                  this.getAbstract()
                } else if (res.resultValue.digestState == 0) {
                  this.abstractLoading = true
                  this.abstractUnfold = true
                  setTimeout(() => {
                    this.startAbstract()
                  }, 1000)
                } else if (res.resultValue.digestState == 1) {
                  this.showDialog = true
                  this.abstractContent = res.resultValue.digestMessage
                  this.abstractLoading = false
                  this.abstractUnfold = true
                  this.freshAbstractWarning = res.resultValue.realEditDigest == 0
                } else if (res.resultValue.digestState == 3) {
                  this.abstractLoading = false
                  this.abstractUnfold = false
                  if (flag) {
                    this.getAbstract()
                  } else {
                    mui.toast('摘要生成失败，请重试', {
                      duration: '1000',
                      type: 'div'
                    })
                  }
                }
              } else {
                mui.toast(res.resultValue, {
                  duration: '1000',
                  type: 'div'
                })
              }
            },
            error: (e) => {
              this.abstractLoading = false
            }
          })
        },
       
        complete(num, type, back) {
          if (num == 1 || !back) {
            $(".curtain").css("display", "block")
          }
          //修改
          let data = {
            "id": this.VoiceItemID, //主键id
            "messageTitle": this.titleText, //笔记标题
            "message": this.content, //笔记内容
            "timestamp": new Date().getTime() + ""
          };
          this.getreviseVoice(data.id, data.messageTitle, data.message, data.timestamp, num, type, back)
        },
        //发送邮箱 type存在时为发送摘要
       }
    })
  </script>
</body>

</html>